
project(sv_aicam_vi_rknn_rtsp)

cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckCXXCompilerFlag)


set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--allow-shlib-undefined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wl,--allow-shlib-undefined")



add_definitions(-g -O0 -ggdb -gdwarf -funwind-tables -rdynamic)


include_directories(../3rdparty/rkmedia/include/)
include_directories(../3rdparty/rkaiq/include/uAPI)
include_directories(../3rdparty/rkaiq/include/common)
include_directories(../3rdparty/rkaiq/include/xcore)
include_directories(../3rdparty/rkaiq/include/algos)
include_directories(../3rdparty/rkaiq/include/iq_parser)
include_directories(../3rdparty/rga/include/)
include_directories(../3rdparty/rknn/include/)


add_definitions(-DRKAIQ)

add_executable(sv_aicam_vi_rknn_rtsp 
	sv_aicam_vi_rknn_rtsp.c
	sample_common_isp.c
)

target_link_libraries(sv_aicam_vi_rknn_rtsp 
	${CMAKE_SOURCE_DIR}/../3rdparty/rkmedia/lib/libeasymedia.so
	${CMAKE_SOURCE_DIR}/../3rdparty/rkaiq/lib/librkaiq.so
	${CMAKE_SOURCE_DIR}/../3rdparty/rga/lib/librga.so
	${CMAKE_SOURCE_DIR}/../3rdparty/rknn/lib/librknn_api.so
	${CMAKE_SOURCE_DIR}/librtsp/librtsp.a
	m pthread
)

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install)
install(TARGETS sv_aicam_vi_rknn_rtsp DESTINATION ./)
install(FILES rtsp-nn.cfg DESTINATION ./)
install(FILES box_priors.txt DESTINATION ./)
install(FILES coco_labels_list.txt DESTINATION ./)
install(FILES ssd_inception_v2_rv1109_rv1126.rknn DESTINATION ./)

